package com.example.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.blog.domain.UserInformation;
import com.example.blog.domain.Writings;
import com.example.blog.dto.operationalLogs.OperationLogsDto;
import com.example.blog.dto.writing.AdminWritingsUpdateDto;
import com.example.blog.dto.writing.WritingsDelDto;
import com.example.blog.vo.writing.WritingDelVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface WritingService extends IService<Writings> {


    //定时任务-->文章信息清理
    Boolean informationCleanup(List<UserInformation> info) throws Exception;

    //上传图片
    List<String> uploadImg(MultipartFile[] file);

    //删除图片
    Integer delImg(String[] oldImg);

    //新增文章
    Integer newArticle(MultipartFile[] file, Writings writings);

    //更新文章
    Integer updateArticle(MultipartFile[] file, Writings writings);

    //Admin根据文章ID删除
    WritingDelVo delWritingId(WritingsDelDto writingsDelDto, OperationLogsDto logsVo);

    //Admin删除用户所有文章
    Integer writingsAdminDelAll(Long id, OperationLogsDto logsVo);
    //Admin更新文章
    Integer updateAdminWriting(AdminWritingsUpdateDto writings,OperationLogsDto logsVo);
}
